<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Javascript 变量</title>
</head>
<body>
<h1>JavaScript 变量</h1>

<p>在本例中，x、y 以及 z 都是变量。</p>
<p id="demo"></p>

<script>
  var x=7;
  var y=8;
  var z=x+y;
  document.getElementById("demo").innerHTML="z的值是："+z;
</script>

</body>
</html>